package com.ziyun.pop.mall.module.register.web;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.service.utils.push.umeng.JsonResult;
import com.ziyun.pop.mall.module.register.model.RegisterVO;
import com.ziyun.pop.mall.module.register.service.RegisterService;

/**
 *
 * @author wang.jie
 * @date 2018年9月6日 下午6:44:08
 */
@Controller
public class RegisterController {

	private final Log log = LogFactory.getLog(this.getClass());
	// private static final String MODEL = "/register/register";

	@Autowired
	private RegisterService registerService;

	/**
	 * 用户 组织 注册服务接口
	 *
	 * @param registerUserData
	 * @return
	 */
	@PostMapping("/registerUserPOP.json")
	@ResponseBody
	public JsonResult<Long> registerUserPOP(@Validated RegisterVO registerVO) {
		Long userId = registerService.registerUserApi(registerVO);
		return JsonResult.success(userId);
	}
}
